﻿#region Copyright and License
/*==============================================================================
 *  Copyright (c) cndotnet.org Corporation.  All rights reserved.
 * ===============================================================================
 * This code and information is provided "as is" without warranty of any kind,
 * either expressed or implied, including but not limited to the implied warranties
 * of merchantability and fitness for a particular purpose.
 * ===============================================================================
 * Licensed under the GNU General Public License (GPL) v2
 * http://www.cndotnet.org/ucenter
 * ==============================================================================*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UCenter.BusinessContract;
using UCenter.TemplateEngine;
using UCenter.BusinessContract.Enumeration;

namespace UCenter.ServiceContract
{
    /// <summary>
    /// The interface of message business service
    /// </summary>
    public interface IMessageService
    {
        /// <summary>
        /// Gets the inbox message.
        /// </summary>
        /// <param name="userId">The user id.</param>
        /// <returns></returns>
        List<MessageContract> GetInboxMessage(int userId);

        /// <summary>
        /// Inserts the message.
        /// </summary>
        /// <param name="currentUser">The current user.</param>
        /// <param name="toUserID">To user ID.</param>
        /// <param name="msgTemplate">The message template.</param>
        /// <param name="msgType">Type of the message.</param>
        /// <returns></returns>
        MessageContract InsertMessage(AccountContract currentUser, int toUserID, TemplateContract msgTemplate, MessageType msgType);

        /// <summary>
        /// Updates the status.
        /// </summary>
        /// <param name="msgID">The message ID.</param>
        /// <param name="status">The status.</param>
        void UpdateStatus(int msgID, bool isNew);

        /// <summary>
        /// Deletes the message.
        /// </summary>
        /// <param name="msgID">The message ID.</param>
        void DeleteMessage(int msgID);
    }
}
